<?php
namespace Hilaoyu\LaravelExtend\Supports;
/**
 * Created by laoyu.
 * User: hilaoyu@qq.com
 * Date: 2019/4/29
 * Time: 14:17
 */




use Hilaoyu\Utils\UtilRegex;
use Illuminate\Support\Str;

class Uuid
{
    static public function generate($no_line = true) {
        $uuid = (string)Str::orderedUuid();
        if($no_line){
            $uuid = str_replace('-','',$uuid);
        }
        return $uuid;
    }

    static public function verify(string $uuid){
        return UtilRegex::isUuid($uuid);
    }
}